package com.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gulimall.common.utils.PageUtils;
import com.gulimall.common.vo.SocialUser;
import com.gulimall.member.entity.MemberEntity;
import com.gulimall.member.excetion.PhoneExistException;
import com.gulimall.member.excetion.UsernameExistExcetion;
import com.gulimall.common.vo.*;

import java.util.Map;

/**
 * 会员
 *
 * @author zk
 * @email zk@gmail.com
 * @date 2020-11-04 08:23:00
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 注册信息
     *
     * @param vo
     */
    void regist(UserLoginVo vo);

    //检查邮箱
    void checkPhoneUnique(String phone) throws PhoneExistException;

    //检查用户名
    void checkUsernameUnique(String username) throws UsernameExistExcetion;

    //登录
    MemberEntity login(UserLoginVo vo);

    //社交登录
    MemberEntity login(SocialUser socialUser) throws Exception;
}

